{{!
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements.  See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership.  The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License.  You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
}}

{{#if view.supportsHostOverrides}}
  <div class="alert alert-info">
    {{t common.group}}&nbsp;
	  <span class="btn-group">
		  <button {{bindAttr disabled="controller.isHostsConfigsPage"}} class="btn">{{selectedConfigGroup.displayNameHosts}}</button>
		  <button {{bindAttr disabled="controller.isHostsConfigsPage"}} class="btn dropdown-toggle" data-toggle="dropdown">
        <span class="caret"></span>
      </button>
		  <ul class="dropdown-menu">
        <!-- available config group menu links -->
        {{#each configGroup in configGroups}}
          <li>
            <a href="#" {{action "selectConfigGroup" configGroup target="controller"}}>
              {{configGroup.displayNameHosts}}
            </a>
          </li>
        {{/each}}
      </ul>
		</span>
    {{#if App.isAdmin}}
      {{#if controller.isHostsConfigsPage}}
        &nbsp;<a href="#" {{action "switchHostGroup" target="controller"}}>{{t common.change}}</a>
      {{else}}
        <a href="#"  class="link-left-pad" {{action "manageConfigurationGroup" target="controller"}}>{{t services.service.actions.manage_configuration_groups.short}}</a>
      {{/if}}
    {{/if}}
    <div class="pull-right">
      {{view App.FilterComboCleanableView filterBinding="view.filter" columnsBinding="view.columns" popoverDescriptionBinding="view.propertyFilterPopover"}}
    </div>
  </div>
{{/if}}

<div class="accordion">
  {{#each catView in view.serviceConfigsByCategoryView.childViews}}
    {{view catView}}
  {{/each}}
</div>
